Optimal. Leaf size=129 \[ \frac {3 b d^2 x}{4 c}+\frac {1}{3} b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac {17 b d^2 \log (1-c x)}{24 c^2}-\frac {b d^2 \log (1+c x)}{24 c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {45, 6083, 12,
1816, 647, 31} \begin {gather*} \frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {17 b d^2 \log (1-c x)}{24 c^2}-\frac {b d^2 \log (c x+1)}{24 c^2}+\frac {1}{12} b c d^2 x^3+\frac {3 b d^2 x}{4 c}+\frac {1}{3} b d^2 x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 45
Rule 647
Rule 1816
Rule 6083
Rubi steps
\begin {align*} \int x (d+c d x)^2 \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-(b c) \int \frac {d^2 x^2 \left (6+8 c x+3 c^2 x^2\right )}{12 \left (1-c^2 x^2\right )} \, dx\\ &=\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{12} \left (b c d^2\right ) \int \frac {x^2 \left (6+8 c x+3 c^2 x^2\right )}{1-c^2 x^2} \, dx\\ &=\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{12} \left (b c d^2\right ) \int \left (-\frac {9}{c^2}-\frac {8 x}{c}-3 x^2+\frac {9+8 c x}{c^2 \left (1-c^2 x^2\right )}\right ) \, dx\\ &=\frac {3 b d^2 x}{4 c}+\frac {1}{3} b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-\frac {\left (b d^2\right ) \int \frac {9+8 c x}{1-c^2 x^2} \, dx}{12 c}\\ &=\frac {3 b d^2 x}{4 c}+\frac {1}{3} b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{24} \left (b d^2\right ) \int \frac {1}{-c-c^2 x} \, dx-\frac {1}{24} \left (17 b d^2\right ) \int \frac {1}{c-c^2 x} \, dx\\ &=\frac {3 b d^2 x}{4 c}+\frac {1}{3} b d^2 x^2+\frac {1}{12} b c d^2 x^3+\frac {1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac {2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac {17 b d^2 \log (1-c x)}{24 c^2}-\frac {b d^2 \log (1+c x)}{24 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 107, normalized size = 0.83 \begin {gather*} \frac {d^2 \left (18 b c x+12 a c^2 x^2+8 b c^2 x^2+16 a c^3 x^3+2 b c^3 x^3+6 a c^4 x^4+2 b c^2 x^2 \left (6+8 c x+3 c^2 x^2\right ) \tanh ^{-1}(c x)+17 b \log (1-c x)-b \log (1+c x)\right )}{24 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 140, normalized size = 1.09
method | result | size |
derivativedivides | \(\frac {d^{2} a \left (\frac {1}{4} c^{4} x^{4}+\frac {2}{3} x^{3} c^{3}+\frac {1}{2} c^{2} x^{2}\right )+\frac {d^{2} b \arctanh \left (c x \right ) c^{4} x^{4}}{4}+\frac {2 d^{2} b \arctanh \left (c x \right ) c^{3} x^{3}}{3}+\frac {d^{2} b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+\frac {d^{2} b \,c^{3} x^{3}}{12}+\frac {d^{2} b \,c^{2} x^{2}}{3}+\frac {3 b c \,d^{2} x}{4}+\frac {17 d^{2} b \ln \left (c x -1\right )}{24}-\frac {d^{2} b \ln \left (c x +1\right )}{24}}{c^{2}}\) | \(140\) |
default | \(\frac {d^{2} a \left (\frac {1}{4} c^{4} x^{4}+\frac {2}{3} x^{3} c^{3}+\frac {1}{2} c^{2} x^{2}\right )+\frac {d^{2} b \arctanh \left (c x \right ) c^{4} x^{4}}{4}+\frac {2 d^{2} b \arctanh \left (c x \right ) c^{3} x^{3}}{3}+\frac {d^{2} b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+\frac {d^{2} b \,c^{3} x^{3}}{12}+\frac {d^{2} b \,c^{2} x^{2}}{3}+\frac {3 b c \,d^{2} x}{4}+\frac {17 d^{2} b \ln \left (c x -1\right )}{24}-\frac {d^{2} b \ln \left (c x +1\right )}{24}}{c^{2}}\) | \(140\) |
risch | \(\frac {d^{2} b \,x^{2} \left (3 c^{2} x^{2}+8 c x +6\right ) \ln \left (c x +1\right )}{24}-\frac {d^{2} c^{2} x^{4} b \ln \left (-c x +1\right )}{8}+\frac {d^{2} c^{2} x^{4} a}{4}-\frac {d^{2} c \,x^{3} b \ln \left (-c x +1\right )}{3}+\frac {2 d^{2} c \,x^{3} a}{3}+\frac {b c \,d^{2} x^{3}}{12}-\frac {d^{2} b \,x^{2} \ln \left (-c x +1\right )}{4}+\frac {d^{2} a \,x^{2}}{2}+\frac {b \,d^{2} x^{2}}{3}+\frac {3 b \,d^{2} x}{4 c}-\frac {b \,d^{2} \ln \left (c x +1\right )}{24 c^{2}}+\frac {17 b \,d^{2} \ln \left (-c x +1\right )}{24 c^{2}}\) | \(174\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 179, normalized size = 1.39 \begin {gather*} \frac {1}{4} \, a c^{2} d^{2} x^{4} + \frac {2}{3} \, a c d^{2} x^{3} + \frac {1}{24} \, {\left (6 \, x^{4} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, {\left (c^{2} x^{3} + 3 \, x\right )}}{c^{4}} - \frac {3 \, \log \left (c x + 1\right )}{c^{5}} + \frac {3 \, \log \left (c x - 1\right )}{c^{5}}\right )}\right )} b c^{2} d^{2} + \frac {1}{3} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {x^{2}}{c^{2}} + \frac {\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b c d^{2} + \frac {1}{2} \, a d^{2} x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b d^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 137, normalized size = 1.06 \begin {gather*} \frac {6 \, a c^{4} d^{2} x^{4} + 2 \, {\left (8 \, a + b\right )} c^{3} d^{2} x^{3} + 4 \, {\left (3 \, a + 2 \, b\right )} c^{2} d^{2} x^{2} + 18 \, b c d^{2} x - b d^{2} \log \left (c x + 1\right ) + 17 \, b d^{2} \log \left (c x - 1\right ) + {\left (3 \, b c^{4} d^{2} x^{4} + 8 \, b c^{3} d^{2} x^{3} + 6 \, b c^{2} d^{2} x^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{24 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.34, size = 167, normalized size = 1.29 \begin {gather*} \begin {cases} \frac {a c^{2} d^{2} x^{4}}{4} + \frac {2 a c d^{2} x^{3}}{3} + \frac {a d^{2} x^{2}}{2} + \frac {b c^{2} d^{2} x^{4} \operatorname {atanh}{\left (c x \right )}}{4} + \frac {2 b c d^{2} x^{3} \operatorname {atanh}{\left (c x \right )}}{3} + \frac {b c d^{2} x^{3}}{12} + \frac {b d^{2} x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + \frac {b d^{2} x^{2}}{3} + \frac {3 b d^{2} x}{4 c} + \frac {2 b d^{2} \log {\left (x - \frac {1}{c} \right )}}{3 c^{2}} - \frac {b d^{2} \operatorname {atanh}{\left (c x \right )}}{12 c^{2}} & \text {for}\: c \neq 0 \\\frac {a d^{2} x^{2}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 425 vs.
\(2 (113) = 226\).
time = 0.40, size = 425, normalized size = 3.29 \begin {gather*} -\frac {1}{3} \, c {\left (\frac {2 \, b d^{2} \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{3}} - \frac {2 \, {\left (\frac {6 \, {\left (c x + 1\right )}^{3} b d^{2}}{{\left (c x - 1\right )}^{3}} - \frac {6 \, {\left (c x + 1\right )}^{2} b d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {4 \, {\left (c x + 1\right )} b d^{2}}{c x - 1} - b d^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{4} c^{3}}{{\left (c x - 1\right )}^{4}} - \frac {4 \, {\left (c x + 1\right )}^{3} c^{3}}{{\left (c x - 1\right )}^{3}} + \frac {6 \, {\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {4 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}} - \frac {2 \, b d^{2} \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{3}} - \frac {\frac {24 \, {\left (c x + 1\right )}^{3} a d^{2}}{{\left (c x - 1\right )}^{3}} - \frac {24 \, {\left (c x + 1\right )}^{2} a d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {16 \, {\left (c x + 1\right )} a d^{2}}{c x - 1} - 4 \, a d^{2} + \frac {10 \, {\left (c x + 1\right )}^{3} b d^{2}}{{\left (c x - 1\right )}^{3}} - \frac {23 \, {\left (c x + 1\right )}^{2} b d^{2}}{{\left (c x - 1\right )}^{2}} + \frac {18 \, {\left (c x + 1\right )} b d^{2}}{c x - 1} - 5 \, b d^{2}}{\frac {{\left (c x + 1\right )}^{4} c^{3}}{{\left (c x - 1\right )}^{4}} - \frac {4 \, {\left (c x + 1\right )}^{3} c^{3}}{{\left (c x - 1\right )}^{3}} + \frac {6 \, {\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {4 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.97, size = 122, normalized size = 0.95 \begin {gather*} \frac {d^2\,\left (6\,a\,x^2+4\,b\,x^2+6\,b\,x^2\,\mathrm {atanh}\left (c\,x\right )\right )}{12}-\frac {\frac {d^2\,\left (9\,b\,\mathrm {atanh}\left (c\,x\right )-4\,b\,\ln \left (c^2\,x^2-1\right )\right )}{12}-\frac {3\,b\,c\,d^2\,x}{4}}{c^2}+\frac {c^2\,d^2\,\left (3\,a\,x^4+3\,b\,x^4\,\mathrm {atanh}\left (c\,x\right )\right )}{12}+\frac {c\,d^2\,\left (8\,a\,x^3+b\,x^3+8\,b\,x^3\,\mathrm {atanh}\left (c\,x\right )\right )}{12} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________